package com.hxzon.aixzsecretary.net;

import java.io.IOException;
import java.net.DatagramPacket;
import java.net.DatagramSocket;
import java.net.InetAddress;

public class UdpQuit extends Thread {

	public void run() {
		DatagramSocket dSocket;
		DatagramPacket outPacket;
		InetAddress sAddr;
		byte[] outBuffer;
		String s = System.getProperty("user.name");

		try {
			dSocket = new DatagramSocket();
			sAddr = InetAddress.getByName("192.168.1.255");
			s = "del" + s;
			outBuffer = s.getBytes();
			outPacket = new DatagramPacket(outBuffer, 0, outBuffer.length,
					sAddr, 3001);
			dSocket.send(outPacket);
			dSocket.close();

			System.exit(0);
		} catch (IOException e) {
		}
	}
}
